package cn.edu.fzu.homemaking.controller;

import javax.annotation.Resource;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartHttpServletRequest;

import cn.edu.fzu.homemaking.service.SysFaceService;
import cn.edu.fzu.homemaking.web.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

/**
 * @author yifan
 * @date 2023/4/10
 */
@Api(tags = "sys-人脸管理")
@RestController
@RequestMapping("/api/sys")
public class SysFaceController {

    @Resource
    private SysFaceService sysFaceService;


    @ApiOperation(value = "上传人脸接口")
    @PostMapping("/uploadFace")
    public Result upload(MultipartHttpServletRequest request) {
        return new Result(sysFaceService.uploadFace(request.getFile("file")));
    }
}
